package com.example.analysis.service.impl;

import com.example.analysis.entity.TeacherCourseClass;
import com.example.analysis.mapper.TeacherCourseClassMapper;
import com.example.analysis.mapper.TeacherDao;
import com.example.analysis.service.TeacherCourseClassService;
import com.example.analysis.utils.Response;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TeacherCourseClassServiceImpl implements TeacherCourseClassService {
    @Resource
    TeacherCourseClassMapper teacherCourseClassMapper;

    @Override
    public Response<TeacherCourseClass> insert(TeacherCourseClass aTeacherCourseClass) {
        try {
            teacherCourseClassMapper.insert(aTeacherCourseClass);
            return new Response<>(true, "Insert success", null);
        } catch (Exception e) {
            return new Response<>(false, "Insert failed: " + e.getMessage(), null);
        }
    }
}
